// Bayesian Network
//   Elvira format 

bnet  "Lluvia" { 

// Network Properties

kindofgraph = "directed";
visualprecision = "0.00";
version = 1.0;
default node states = ("presente" , "ausente");

// Variables 

node Lluvia(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =60;
pos_y =105;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =154;
pos_y =211;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =156;
pos_y =386;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat_1(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =319;
pos_y =114;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat_2(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =470;
pos_y =198;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat_3(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =604;
pos_y =114;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat_4(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =743;
pos_y =196;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat_5(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =852;
pos_y =110;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat_6(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =988;
pos_y =195;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat_8(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =1099;
pos_y =104;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Lluviat_9(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =1313;
pos_y =183;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat_1(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =329;
pos_y =265;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat_2(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =478;
pos_y =401;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat_3(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =598;
pos_y =269;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat_4(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =759;
pos_y =376;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat_5(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =888;
pos_y =268;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat_6(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =1036;
pos_y =365;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat_8(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =1124;
pos_y =257;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

node Paraguat_9(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =1324;
pos_y =370;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("si" "no");
}

// Links of the associated graph:

link Lluvia Lluviat;

link Lluviat Lluviat_1;

link Lluviat Paraguat;

link Lluviat_1 Lluviat_2;

link Lluviat_1 Paraguat_1;

link Lluviat_2 Lluviat_3;

link Lluviat_2 Paraguat_2;

link Lluviat_3 Lluviat_4;

link Lluviat_3 Paraguat_3;

link Lluviat_4 Lluviat_5;

link Lluviat_4 Paraguat_4;

link Lluviat_5 Lluviat_6;

link Lluviat_5 Paraguat_5;

link Lluviat_6 Lluviat_8;

link Lluviat_6 Paraguat_6;

link Lluviat_8 Lluviat_9;

link Lluviat_8 Paraguat_8;

link Lluviat_9 Paraguat_9;

//Network Relationships: 

relation Lluvia { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.5 0.5 );
}

relation Lluviat Lluvia { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Paraguat Lluviat { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

relation Lluviat_1 Lluviat { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Lluviat_2 Lluviat_1 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Lluviat_3 Lluviat_2 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Lluviat_4 Lluviat_3 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Lluviat_5 Lluviat_4 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Lluviat_6 Lluviat_5 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Lluviat_8 Lluviat_6 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Lluviat_9 Lluviat_8 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.7 0.3 0.3 0.7 );
}

relation Paraguat_1 Lluviat_1 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

relation Paraguat_2 Lluviat_2 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

relation Paraguat_3 Lluviat_3 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

relation Paraguat_4 Lluviat_4 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

relation Paraguat_5 Lluviat_5 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

relation Paraguat_6 Lluviat_6 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

relation Paraguat_8 Lluviat_8 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

relation Paraguat_9 Lluviat_9 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.9 0.2 0.1 0.8 );
}

}
